// 主机管理页面样式 - 使用统一样式系统
// 导入统一样式系统
@import '@/styles/variables.scss';
@import '@/styles/mixins.scss';

// 只保留页面特定的样式，其他使用统一样式系统
.action-buttons {
  display: flex;
  gap: 3px;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 2px;

  .action-btn {
    padding: 3px 5px !important;
    font-size: 10px !important;
    white-space: nowrap !important;
    min-width: 26px !important;
    height: 26px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;

    i {
      font-size: 10px !important;
      line-height: 1 !important;
      margin: 0 !important;
    }
  }
}

// 主机名单元格样式
.hostname-cell {
  display: flex;
  align-items: center;
  gap: 8px;

  .host-icon {
    // 移除固定颜色，让动态颜色生效
    // color: #00eaff;
    color: inherit !important;
    font-size: 14px;
  }

  .hostname-text {
    color: white;
    font-weight: 500;
  }
}

// 状态指示器样式
.status-cell {
  display: flex;
  align-items: center;
  gap: 6px;

  .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;

    &.online {
      background: #19e698;
      box-shadow: 0 0 6px rgba(25, 230, 152, 0.6);
    }

    &.offline {
      background: #f56c6c;
      box-shadow: 0 0 6px rgba(245, 108, 108, 0.6);
    }
  }
}

// 系统类型单元格样式
.system-type-cell {
  display: flex;
  align-items: center;
  gap: 6px;

  .system-icon {
    font-size: 14px;

    &.fa-linux {
      color: #fcc624;
    }

    &.fa-windows {
      color: #0078d4;
    }

    &.fa-apple {
      color: #a2aaad;
    }
  }
}

// 标签样式
.type-tag {
  font-size: 12px;

  i {
    margin-right: 4px;
    color: inherit !important;
  }
}

.version-tag {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  background: rgba(0, 234, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(0, 234, 255, 0.3);
}

.arch-tag {
  color: #00eaff;
  font-weight: 600;
  font-size: 12px;
}

.cpu-cores {
  color: #00eaff;
  font-weight: 600;
}

.hardware-detail {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
}

.no-data {
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}

.ip-text {
  font-family: 'Courier New', monospace;
  color: rgba(255, 255, 255, 0.9);
}

// 主机组标签样式
.host-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

// 主机详情样式
.host-detail {
  .detail-value {
    display: flex;
    align-items: center;
    gap: 8px;

    i {
      color: #00eaff;
    }
  }

  .ip-content {
    font-family: 'Courier New', monospace;
    color: $text-primary;
  }

  .port-content {
    color: $primary-color;
    font-weight: 600;
  }
}

// 表单提示样式
.form-tip {
  margin-top: 5px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 5px;

  i {
    color: #00eaff;
  }
}

// 认证方式单选组样式
.auth-radio-group {
  display: flex;
  gap: 20px;

  .tech-radio {
    color: rgba(255, 255, 255, 0.9);
  }
}

// 对话框底部样式
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

// 操作按钮样式优化
.action-buttons {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;

  .action-btn {
    min-width: 28px !important;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    // 按钮颜色
    &.el-button--primary {
      background: linear-gradient(135deg, #409eff, #5dade2) !important;
      border-color: #409eff !important;
      color: white !important;

      &:hover {
        background: linear-gradient(135deg, #66b1ff, #7bb8e6) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(64, 158, 255, 0.4) !important;
      }
    }

    &.el-button--info {
      background: linear-gradient(135deg, #909399, #a6a9ad) !important;
      border-color: #909399 !important;
      color: white !important;

      &:hover {
        background: linear-gradient(135deg, #a6a9ad, #b1b3b8) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(144, 147, 153, 0.4) !important;
      }
    }

    &.el-button--success {
      background: linear-gradient(135deg, #67c23a, #85ce61) !important;
      border-color: #67c23a !important;
      color: white !important;

      &:hover {
        background: linear-gradient(135deg, #85ce61, #95d475) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(103, 194, 58, 0.4) !important;
      }
    }

    &.el-button--warning {
      background: linear-gradient(135deg, #e6a23c, #ebb563) !important;
      border-color: #e6a23c !important;
      color: white !important;

      &:hover {
        background: linear-gradient(135deg, #ebb563, #f0c78a) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(230, 162, 60, 0.4) !important;
      }
    }

    &.el-button--danger {
      background: linear-gradient(135deg, #f56c6c, #f78989) !important;
      border-color: #f56c6c !important;
      color: white !important;

      &:hover {
        background: linear-gradient(135deg, #f78989, #f9a7a7) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(245, 108, 108, 0.4) !important;
      }
    }

    i {
      font-size: 12px !important;
      margin: 0 !important;
    }
  }
}
